<?php

namespace App\Http\Controllers\Proxemics;

use App\Http\Controllers\Util\UploadController;
use App\Models\Administrator;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ProxemicsController extends Controller
{
    //头像上传
   public function icon(){
   return view('proxemics.proxemics.icon');
   }
   public function iconLoad(Request $request){
//       dd($request->iconUrl);
       if($request->iconUrl){
           $data=[
               'icon'=>$request->iconUrl
           ];
           auth('admin')->user()->update($data);
       }else {
                return back()->with('error','请点击图片选择图片哟');
       }
       return back()->with('success','修改图片成功');
   }
}
